﻿using System;
using System.IO;

namespace Terraria.Net
{
	// Token: 0x0200014E RID: 334
	public abstract class NetModule
	{
		// Token: 0x06000E89 RID: 3721 RVA: 0x00006459 File Offset: 0x00004659
		public NetModule()
		{
		}

		// Token: 0x06000E8A RID: 3722
		public abstract bool Deserialize(BinaryReader reader, int userId);

		// Token: 0x06000E8B RID: 3723 RVA: 0x003FFE84 File Offset: 0x003FE084
		protected static NetPacket CreatePacket<T>(int maxSize) where T : NetModule
		{
			ushort id = NetManager.Instance.GetId<T>();
			NetPacket result = new NetPacket(id, maxSize);
			return result;
		}
	}
}
